<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!Doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>添加商品信息</title>
    <%@include file="/common/header.jsp" %>
</head>

<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">添加商品</div>
        <%@include file="/common/admin_top.jsp" %>
    </div>
    <%@include file="/common/admin_left.jsp" %>

    <div class="layui-body">
        <div style="margin:15px auto;">
            <form class="layui-form" action="/commodity/add" method="post">
                <<input type="hidden" name="id" value="${commodity.id}">
                <div class="layui-form-item">
                    <label class="layui-form-label">商品名称</label>
                    <div class="layui-input-inline">
                        <input type="text" value="${commodity.comName}" name="comName" required lay-verify="required" placeholder="请输入商品名称" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">商品类型</label>
                    <div class="layui-input-inline">
                        <input type="text"  name="typeId" required lay-verify="required" placeholder="请输入商品类型" autocomplete="off" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">商品价格</label>
                    <div class="layui-input-inline">
                        <input type="text" value="${commodity.comPrice}" name="comPrice" required lay-verify="required" placeholder="请输入商品价格" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">商品描述</label>
                    <div class="layui-input-inline">
					<textarea name="comIntroduce" id=""   lay-verify="required" class="layui-textarea" placeholder="请输入商品描述"  cols="30" rows="7">
                        ${commodity.comIntroduce}
                    </textarea>
                    </div>
                </div>

                <%--<div class="layui-form-item">--%>
                <%--<label class="layui-form-label">发布日期</label>--%>
                <%--<div class="layui-input-inline">--%>
                <%--<input type="text" id='pubDate' name="pubDate" placeholder="请输入发布日期" autocomplete="off" class="layui-input">--%>
                <%--</div>--%>
                <%--</div>--%>

                <%--<div class="layui-form-item">--%>
                <%--<label class="layui-form-label">是否已卖</label>--%>
                <%--<div class="layui-input-inline">--%>
                <%--<input type="text" name="isBuy" placeholder="已交易，输入是，否则为否" autocomplete="off" class="layui-input">--%>
                <%--</div>--%>
                <%--</div>--%>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                    </div>
                </div>

            </form>
        </div>

    </div>
</div>
<script>
    layui.use(['jquery','layer','form','laydate'], function(){
        var form = layui.form;
        var laydate = layui.laydate;

        //常规用法
        form.on('submit(*)',function(){

        });

        form.render();
    });
</script>

</body>
</html>